package com.gitee.ly.ymorm.executor.handler;

import com.gitee.ly.ymorm.mapping.BoundSql;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;

/**
 * StatementHandler
 *
 * @author ly
 **/
public interface StatementHandler {

    Statement prepare(Connection connection, Integer transactionTimeout) throws SQLException;

    void parameterize(Statement statement) throws SQLException;

    void batch(Statement statement) throws SQLException;

    int update(Statement statement) throws SQLException;

    <E> List<E> query(Statement statement, Class<? extends E> resultType) throws SQLException;

    BoundSql getBoundSql();

}
